﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MVCPets.Models.LogOnModel>" %>

<asp:Content ID="loginTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Log On
</asp:Content>

<asp:Content ID="loginContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Log On</h2>
    <p>
        Please enter your username and password. <%= Html.ActionLink("Register", "Register") %> if you don't have an account.
    </p>

    <% using (Html.BeginForm()) { %>
        <%= Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") %>
        <div id="loginDiv">
            <fieldset>
                <legend>Account Information</legend>
                <table>
                <tr>
                  <td class="loginLabel">
                    <label for="email">Email:</label>
                  </td>
                  <td>
                    <%= Html.TextBox("EmailAddress", null, new { @class = "loginTextBox" })%>
                    <%= Html.ValidationMessage("EmailAddress")%>
                  </td>
                </tr>
                <tr>
                  <td class="loginLabel">
                    <label for="password" class="loginLabel">Password:</label>
                  </td>
                  <td>
                    <%= Html.Password("Password", null, new { @class = "loginTextBox" })%>
                    <%= Html.ValidationMessage("Password")%>
                  </td>
                </tr>
                <tr>
                  <td colspan="2" class="loginButton"><input type="submit" value="Log On" /></td>
                </tr>
                </table>                
            </fieldset>
        </div>
    <% } %>
</asp:Content>
